import http from "@/utils/request"

export default {
	captcha: {
		url: '/auth/captcha',
		name: "获取验证码",
		get: function () {
			return http.get(this.url);
		}
	},
	login: {
		url: '/auth/login',
		name: "登录",
		post: function (data = {}) {
			return http.post(this.url, data);
		}
	},
	sms: {
		url: '/auth/sms',
		name: "发送短信验证码",
		post: function (data = {}) {
			return http.post(this.url, data);
		}
	},
	mobileLogin: {
		url: '/auth/mobileLogin',
		name: "手机号登录",
		post: function (data = {}) {
			return http.post(this.url, data);
		}
	},
	register: {
		url: '/auth/register',
		name: "账号注册",
		post: function (data = {}) {
			return http.post(this.url, data);
		}
	},
	detail: {
		url: '/auth/detail',
		name: "个人信息",
		get: function () {
			return http.get(this.url);
		}
	},
	logout: {
		url: '/auth/logout',
		name: "退出登录",
		post: function (data = {}) {
			return http.post(this.url, data);
		}
	}
}
